//
//  MindHeaderView.m
//  MindBox
//
//  Created by MS on 16-1-13.
//  Copyright (c) 2016年 Lemon. All rights reserved.
//

#import "MindHeaderView.h"
#import "UIImageView+WebCache.h"
@interface MindHeaderView ()

@property (weak, nonatomic) IBOutlet UIImageView *imgeView;
@property (weak, nonatomic) IBOutlet UILabel *titleView;
@property (weak, nonatomic) IBOutlet UILabel *subtitleView;

@end

@implementation MindHeaderView

+(instancetype)mindheadViewWithXib
{
    return [[[NSBundle mainBundle] loadNibNamed:NSStringFromClass([self class]) owner:nil options:nil] lastObject];
}

-(void)setBanner:(Mind_Banner *)banner
{
    _banner = banner;
    
    [_imgeView sd_setImageWithURL:[NSURL URLWithString:banner.image_url]];
    _titleView.text = banner.name;
    _subtitleView.text = banner.short_descrip;
    
    
}

- (IBAction)btnclick:(id)sender {
    if (self.MindHeaderBlock) {
        _MindHeaderBlock(self.banner);
    }
}




/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
